/****************************************************************************
 *
 *  3DSOMNM.H
 *
 *  (C) Copyright 1997 by Autodesk, Inc.
 *
 *  This program is copyrighted by Autodesk, Inc. and is licensed to you under
 *  the following conditions.  You may not distribute or publish the source
 *  code of this program in any form.  You may incorporate this code in object
 *  form in derivative works provided such derivative works are (i.) are de-
 *  signed and intended to work solely with Autodesk, Inc. products, and (ii.)
 *  contain Autodesk's copyright notice "(C) Copyright 1995 by Autodesk, Inc."
 *
 *  AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.  AUTODESK SPE-
 *  CIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
 *  A PARTICULAR USE.  AUTODESK, INC.  DOES NOT WARRANT THAT THE OPERATION OF
 *  THE PROGRAM WILL BE UNINTERRUPTED OR ERROR FREE.
 *
 ***************************************************************************/

#ifndef OMNM_3DS_H
#define OMNM_3DS_H

#include "3DSTYPE.H"
#include "3DSPRIM.H"
#include "DBASE3DS.H"
#include "CHUNK3DS.H"

/* Public Typedefs */

/* Used By OmnilightMotion3ds */

typedef struct {
   char3ds name[11];    /* Name of the light object node */
   char3ds parent[22];  /* Name of the parent object */

   ushort3ds flags1;    /* flags field from node header -fixup later */
   ushort3ds flags2;    /* flags2 field from node header -fixup later */

   ulong3ds npkeys;     /* Number of position keys */
   ushort3ds npflag;     /* Loop control flag for position keys */
   keyheader3ds *pkeys; /* Spline values for position keys */
   point3ds *pos;       /* Position keys */

   ulong3ds nckeys;     /* Number of color keys */
   ushort3ds ncflag;     /* Loop control flag for color keys */
   keyheader3ds *ckeys; /* Spline values for position keys */
   fcolor3ds *color;   /* Color keys */

} kfomni3ds;
/* End Public */

#ifdef __cplusplus
extern "C" {
#endif

/* Public Prototypes */
void InitOmnilightMotion3ds(kfomni3ds **light, 
			    ulong3ds npkeys, 
			    ulong3ds nckeys);

void ReleaseOmnilightMotion3ds(kfomni3ds **light);

void GetOmnilightNodeNameList3ds(database3ds *db, 
				 namelist3ds **list);

void GetOmnilightMotionByName3ds(database3ds *db, 
				 char3ds *name, 
				 kfomni3ds **kfomni);

void GetOmnilightMotionByIndex3ds(database3ds *db, 
				  ulong3ds index,
				  kfomni3ds **kfomni);

ulong3ds GetOmnilightNodeCount3ds(database3ds *db);

void PutOmnilightMotion3ds(database3ds *db, 
			   kfomni3ds *kfomni);

void PutOmnilightMotion3ds(database3ds *db, 
			   kfomni3ds *kfomni);

void DeleteOmnilightMotionByIndex3ds(database3ds *db, ulong3ds index);
void DeleteOmnilightMotionByName3ds(database3ds *db, char3ds *name);
void CopyOmnilightMotionByIndex3ds(database3ds *destdb, database3ds *srcdb, ulong3ds index);
void CopyOmnilightMotionByName3ds(database3ds *destdb, database3ds *srcdb, char3ds *name);
/* End Public */
void GetOmnilightMotion3ds(chunk3ds *pOmniChunk,
			   kfomni3ds **kfomni);

#ifdef __cplusplus
}
#endif

#endif
